package com.gjj.echarts.echartsgjj.service.impl;


import com.gjj.echarts.echartsgjj.service.OneMonthService;
import com.gjj.echarts.echartsgjj.service.OneYearService;
import com.gjj.echarts.echartsgjj.vo.OneMonthVo;
import com.gjj.echarts.echartsgjj.vo.OneYearVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class OneYearServiceImpl implements OneYearService {
    @Autowired
    OneMonthService oneMonthService;
    @Override
    public OneYearVo selectOneYear() {
        OneYearVo vo = new OneYearVo();
        List<OneMonthVo> vos = new ArrayList<>();
        vos.add(oneMonthService.selectOneMonth(1));
        vos.add(oneMonthService.selectOneMonth(2));
        vos.add(oneMonthService.selectOneMonth(3));
        vos.add(oneMonthService.selectOneMonth(4));
        vos.add(oneMonthService.selectOneMonth(5));
        vos.add(oneMonthService.selectOneMonth(6));
        vos.add(oneMonthService.selectOneMonth(7));
        vos.add(oneMonthService.selectOneMonth(8));
        vos.add(oneMonthService.selectOneMonth(9));
        vos.add(oneMonthService.selectOneMonth(10));
        vos.add(oneMonthService.selectOneMonth(11));
        vos.add(oneMonthService.selectOneMonth(12));

        for (OneMonthVo oneMonthVo : vos) {
            Integer month = oneMonthVo.getMonth();
        }

        vo.setMonthVos(vos);
        return vo;
    }
}
